<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "d_try.day_try".
 *
 * @property string $day_try_id
 * @property integer $goods_id
 * @property string $goods_name
 * @property string $goods_code
 * @property string $recommend_date
 */
class DayTry extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'd_try.day_try';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['goods_id', 'goods_name', 'goods_code', 'recommend_date'], 'required'],
            [['goods_id'], 'integer'],
            [['recommend_date','add_time'], 'safe'],
            [['goods_name'], 'string', 'max' => 50],
            [['goods_code'], 'string', 'max' => 16],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'day_try_id' => 'Day Try ID',
            'goods_id' => '商品ID',
            'goods_name' => '商品名称',
            'goods_code' => '商品编码',
            'recommend_date' => '推荐日期',
            'add_time' => '添加日期',
        ];
    }

    /**
     * @inheritdoc
     * @return \services\models\DayTryQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new \services\models\DayTryQuery(get_called_class());
    }
}
